from django.contrib.auth.models import Permission
from rest_framework.viewsets import ModelViewSet
from meiduo_mall_admin.my_paginate import MyPageNumberPagination
from . import system_serializers
from rest_framework.generics import ListAPIView
from django.contrib.auth.models import ContentType


class PermissionViews(ModelViewSet):
    pagination_class = MyPageNumberPagination
    serializer_class = system_serializers.PermissionSerializer
    queryset = Permission.objects.order_by("id").all()



class PermissioTypenViews(ListAPIView):
    serializer_class = system_serializers.PermissioTypenSerializer
    queryset = ContentType.objects.all()







